home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1993 February / 64er_Magazin_93-02_1993_Markt__Technik_de_Side_A.d64 / the snake (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  1KB  |  21 lines

  1. 1 t=3:poke53280,2:poke53281,0:pt=0:forg=0to73:readu:poke12288+g,u:next:v=160
  2. 2 print"[147]     score   lives  <<snake by ch.wolf>>":pt=pt-1:f=1:poke56295,2
  3. 3 print"                                       [146]";
  4. 4 poke2023,v:ift=0thenpokeq,32:print""tab(15)"game over":print"[157]";pt+1:end
  5. 5 c=1:r=1:x=20:y=12:xo=20:yo=12:poke16384,xo:poke20480,yo:bl=42:gosub20:gosub15
  6. 6 ad=1024+x+40*y:ifpeek(ad)=42thenc=c+1:bl=42:gosub15:bl=86:gosub16
  7. 7 ifpeek(ad)<>32andpeek(ad)<>42andc>1thent=t-1:goto14
  8. 8 xo=x:yo=y:poke255,c:poke24576,x:poke28672,y:sys12288:j=peek(56320)
  9. 9 ifj=123or(r=3andj<>126andj<>125)thenx=x-1:r=3:ifx=-1thent=t-1:goto14
  10. 10 ifj=119or(r=4andj<>126andj<>125)thenx=x+1:r=4:ifx=40thent=t-1:goto14
  11. 11 ifj=126orr=1theny=y-1:r=1:ify=0thent=t-1:goto14
  12. 12 ifj=125orr=2theny=y+1:r=2:ify=24thent=t-1:goto14
  13. 13 goto6:data 172,0,64,174,0,80,24,32,240,255,169,32,32,210,255,173,0,96
  14. 14 pt=pt-1:gosub15:fora=0to65:poke53280,10:poke53280,2:next:f=0:goto2
  15. 15 pt=pt+1:print"[157]";pt,t;"":iff=0then return:greenfrog of x-rated
  16. 16 yr=int(rnd(1)*24):xr=int(rnd(1)*40):q=yr*40+1024+xr:ifpeek(q)<>32then16
  17. 17 data 166,255,157,0,64,173,0,112,157,0,80,134,253,166,253,189,0,64,168,189
  18. 18 data 0,80,170,24,32,240,255,169,113,32,210,255,198,253,208,233,162,0,189,1
  19. 19 data 64,157,0,64,189,1,80,157,0,80,232,228,255,208,239,96,0:pokeq,bl:return
  20. 20 poke53272,21:print"get ready":foro=0to999:next:print"         ":return
  21.